<script type="text/javascript">
	

function Stack() {
	this.arr = [];
	this.length = 0;
}

Stack.prototype.push1 = function(element) {
	console.log(this)
	this.arr[this.length++] = element;
}

Stack.prototype.pop1 = function() {
	for(let i = 0; i < this.length-1; i++) {
		this.arr[i] = this.arr[i+1];
	}
	delete this.arr[this.length-1]
}

let arr1 = new Stack();
let arr2 = new Stack();
arr1.push1(1);
arr1.push1(2);
arr1.push1(3);
console.log(arr1, arr2);
arr1.pop1();
console.log(arr1, arr2);
console.log(window)


</script>